<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>登录</title>
    <link rel="icon" href="../../module/favicon.ico" type="image/ico">
    <link href="../../module/css/bootstrap.min.css" rel="stylesheet">
    <link href="../../module/css/materialdesignicons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../module/js/jconfirm/jquery-confirm.min.css">
    <link href="../../module/css/style.min.css" rel="stylesheet">
    <script type="text/javascript" src="../../module/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../module/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../module/js/perfect-scrollbar.min.js"></script>
    <script type="text/javascript" src="../../module/js/jconfirm/jquery-confirm.min.js"></script>
    <script type="text/javascript" src="../../module/js/main.min.js"></script>
    <script type="text/javascript" src="../../module/js/Chart.js"></script>
    <script type="text/javascript" src="../../js/base.js"></script>
    <script type="text/javascript" src="../../js/user/user-ajax.js"></script>
    <style>
        .lyear-wrapper {
            position: relative;
        }

        .lyear-login {
            display: flex !important;
            min-height: 100vh;
            align-items: center !important;
            justify-content: center !important;
        }

        .login-center {
            background: #fff;
            min-width: 38.25rem;
            padding: 2.14286em 3.57143em;
            border-radius: 5px;
            margin: 2.85714em 0;
        }

        .login-header {
            margin-bottom: 1.5rem !important;
        }

        .login-center .has-feedback.feedback-left .form-control {
            padding-left: 38px;
            padding-right: 12px;
        }

        .login-center .has-feedback.feedback-left .form-control-feedback {
            left: 0;
            right: auto;
            width: 38px;
            height: 38px;
            line-height: 38px;
            z-index: 4;
            color: #dcdcdc;
        }

        .login-center .has-feedback.feedback-left.row .form-control-feedback {
            left: 15px;
        }
    </style>
</head>
<body class="lyear-layout-sidebar-close">
<div class="row lyear-wrapper">
    <div class="lyear-login">
        <div class="login-center">
            <div class="login-header text-center">
                <a href="../../index.html"> <img alt="light year admin" src="/static/logo.png" style="height: 50px;">
                </a>
            </div>
            <div>
                <div class="form-group has-feedback feedback-left">
                    <input type="text" placeholder="用户名/邮箱/手机号" class="form-control" id="parameter-input"/>
                    <span class="mdi mdi-account form-control-feedback" aria-hidden="true"></span>
                </div>
                <div class="form-group has-feedback feedback-left">
                    <input type="password" placeholder="密码" class="form-control" id="password-input"/>
                    <span class="mdi mdi-lock form-control-feedback" aria-hidden="true"></span>
                </div>
                <div class="form-group">
                    <button class="btn btn-block btn-cyan" id="login-button" type="button">立即登录</button>
                </div>
            </div>
            <div class="login-header text-center">
                <a href="login.html">
                    <button class="btn btn-cyan" style="width:100px;margin: 20px 20px 0 0" disabled>登录</button>
                </a>
                <a href="register.html">
                    <button class="btn btn-primary" style="width: 100px;margin: 20px 20px 0 20px">注册</button>
                </a>
                <a href="reset.html">
                    <button class="btn btn-danger" style="width: 100px;margin: 20px 0 0 20px">重置密码</button>
                </a>
            </div>
        </div>
    </div>
</div>

<script>
    $(document).on("click", "#login-button", function () {
        var parameter = document.getElementById("parameter-input").value;
        var password = document.getElementById("password-input").value;
        login(parameter, password);
    })
</script>
</body>
</html>